﻿//copyright © kaveh.shahbazian@gmail.com and http://www.codeplex.com/site/users/view/Cread 2010-2011 (see license.txt)
using System.Windows;
#if DEBUG
using System.Diagnostics;
#endif

namespace Funtastic
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e) 
        { 
            base.OnStartup(e);

            // test for command line arguments
            if (e.Args.Length != 0)
            {
#if DEBUG
                Debug.WriteLine("Args: " + e.Args[0]);
#endif
                new MainWindow(e.Args[0]).ShowDialog();
            }
            else
                // start Application
                new MainWindow().ShowDialog();
            
            Shutdown();
        }
    }
}
